package com.kevin;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import lombok.extern.log4j.Log4j;

import org.jvnet.substance.skin.SubstanceGreenMagicLookAndFeel;

@Log4j
public class RunMain {

    public static void main(String[] args) {
        JFrame.setDefaultLookAndFeelDecorated(true);
        log.info(UIManager.getSystemLookAndFeelClassName());
        try {
//            SwingUtilities.invokeLater(new Runnable() {// 5.3及以后 多jar包trident.jar
//                        @Override
//                        public void run() {
//
//                            try {
//                                SubstanceLookAndFeel.setSkin(new GreenMagicSkin());
//                            } catch (Exception e) {
//                                // e.printStackTrace();
//                            }
//                        }
//
//                    });

//            Class.forName("org.jvnet.substance.SubstanceLookAndFeel");
//            UIManager.LookAndFeelInfo substance = new UIManager.LookAndFeelInfo("Substance", "org.jvnet.substance.SubstanceLookAndFeel");
//            UIManager.installLookAndFeel(substance);
//            UIManager.LookAndFeelInfo[] AVAILABLES = UIManager.getInstalledLookAndFeels();
//            for (UIManager.LookAndFeelInfo available : AVAILABLES) {
//                System.out.println(available.getName());
//            }
            UIManager.setLookAndFeel(new SubstanceGreenMagicLookAndFeel());// 旧版去除两jar包
        } catch (Exception e) {
            log.error("Substance Raven Graphite failed to initialize");
        }
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                MainFrame w = new MainFrame();
                w.setVisible(true);
            }
        });
    }
}
